<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>张及琛的个人博客</title>
    <meta name="keywords" content="个人博客模板,博客模板,响应式"/>
    <meta name="description" content="个人博客模板"/>
    <link href="css/base.css" rel="stylesheet">
    <link href="css/index.css" rel="stylesheet">

    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
    <!--[if lt IE 9]>
    <script src="js/modernizr.js"></script>
    <![endif]-->
</head>
<body>
<div class="ibody">
    <?php include "header.php";?>
    <article>
        <div class="banner">
            <ul class="texts">
                <p>The best life is use of willing attitude, a happy-go-lucky life. </p>
                <p>最好的生活是用心甘情愿的态度，过随遇而安的生活。</p>
            </ul>
        </div>
        <div class="bloglist whitebg">
            <h2>
                <p><span>最新</span>文章</p>
            </h2>
            <?php
                require_once "./admin/config.php";
                $sql = "select * from article order by id desc";
                $rst = mysqli_query($con,$sql);
            for($i=1;$i<=6;$i++){
                $row = mysqli_fetch_assoc($rst);
                $sql1 = "select * from category where id = {$row['cateid']}";
                $rst1 = mysqli_query($con,$sql1);
                $row1 = mysqli_fetch_assoc($rst1);
            ?>
            <div class="blogs">
                <h3><a href="detail.php?id=<?php echo $row['id']; ?>& view =<?php echo $row[article_view]+1;?>"><?php echo $row['title']; ?></a></h3>
                <figure><img src="images/01.jpg"></figure>
                <ul>
                    <p><a style="color: #000;" href="detail.php?id=<?php echo $row['id']; ?>& view=<?php echo $row['article_view']+1;?>">
                            <?php echo substr($row['content'],0,552)."......"; ?>
                        </a></p>
                    <a href="detail.php?id=<?php echo $row['id']; ?>& view =<?php echo $row[article_view]+1;?>"  class="readmore">阅读全文&gt;&gt;</a>
                </ul>
                <p class="autor"><span>作者：<?php echo $row['author']; ?></span><span>发表：<?php echo date("Y-m-d H:i:s",$row['time']); ?></span><span>分类：【<a href="list.php?id=<?php echo $row1['id']; ?>"><?php echo $row1['cate_name']; ?></a>】</span><span>浏览（<?php echo $row['article_view'];?>）</span><span>评论（30）</span></p>
                </div>
            <?php } ?>


        </div>
    </article>
    <aside>
        <div class="whitebg">
            <div class="avatar"><a href="about.php"><span>关于博主</span></a></div>

            <div class="topspaceinfo">
                <h1>执子之手，与子偕老</h1>
                <p>于千万人之中，我遇见了我所遇见的人....</p>
            </div>
        </div>
        <div class="whitebg">
            <div class="about_c">
                <p>网名：blue gull | 张及琛</p>
                <p>职业：php开发工程师 </p>
                <p>籍贯：河南省―郑州市</p>
                <p>电话：13782984227</p>
                <p>邮箱：zjc348@126.com</p>
            </div>
        </div>
        <div class="whitebg">
            <div class="bdsharebuttonbox"><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_more" data-cmd="more"></a>
            </div>
        </div>
        <?php include "new_article_title_list.php"; ?>
        <div class="whitebg">
            <div class="links">
                <h2>
                    <p>友情链接</p>
                </h2>
                <ul>
                    <li><a href="index.php">个人博客</a></li>
                </ul>
            </div>
        </div>
        <div class="whitebg">
            <div class="links">
                <h2>
                    <p>版权声明</p>
                </h2>
                <ul>
                    <li><a href="index.php">powby 张及琛</a></li>
                    <li><a href="index.php">豫ICP备1234567号</a></li>
                </ul>
            </div>
        </div>
    </aside>
    <script src="js/silder.js"></script>
    <div class="clear"></div>
    <!-- 清除浮动 -->
</div>
</body>
</html>
